<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="ISO-8859-1"%>
<%@ page import = "quiz.Account" %>
<%@ page import = "quiz.Result" %>
<%@ page import = "java.util.ArrayList" %>
<%
	ArrayList<Result> activity = (ArrayList<Result>)request.getAttribute("userHistory");
%>
<jsp:include page="templates/header.jsp" flush="true">
	<jsp:param value = "Your History" name = "title" />
</jsp:include>
<jsp:include page="templates/title_bar.jsp" flush = "true">
	<jsp:param value = "Your History" name = "title" />
</jsp:include>
<div id = "content">
<div class = "center">

<div id = "activity" class = "profile"><div class = "section_title">Recent Activity</div>
<%
	if (activity == null || activity.size() == 0) out.println("You haven't taken any quizzes!");
	for (Result r: activity) {
		out.println("<div id = \"result\">You scored "+r.getScore()+" on <a href = \"ShowSelectedQuiz?id="+r.getQuiz().getID()+"\">"+r.getQuiz().getName()+"</a></div>");
	}
%>
</div>
</div>
</div>
<jsp:include page="templates/footer.jsp" flush="true" />